// 基于准备好的dom，初始化echarts实例
var myChart6 = echarts.init(document.getElementById('main_6'));
// 指定图表的配置项和数据
var option6 = {
    title: {
        text: '广州市各行政区经营性物业贷款比例',
        x: 'center',
        textStyle: {
            color: '#ADADAD',
            fontSize : 12
        },
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        },
        formatter: '{b0}:{c0}%'
    },
    legend: {
        data: ['经营性物业贷款占比'],
        bottom: "0"
    },
    grid: {

    },
    xAxis: {
        type: 'category',
        data: ['越秀区','从化区','增城区','白云区','海珠区','荔湾区','番禺区','天河区','花都区','黄埔区']
    },
    yAxis: {
        type: 'value',
        boundaryGap: [0, 0.01],
        axisLabel: {
            formatter: '{value}%'
        },
    },
    series: [
        {
            name: '经营性物业贷款占比',
            type: 'bar',
            data: [21, 42, 43, 42, 76, 73,49,20,61,81]
        }
    ]
};
myChart6.setOption(option6);

var myChart7 = echarts.init(document.getElementById('main_7'));
// 指定图表的配置项和数据
var option7 = {
    title : {
        text: '越秀区',
        x:'center',
        textStyle: {
            color: '#ADADAD',
            fontSize : 12
        },
    },
    tooltip : {
        trigger: 'item',
        formatter: "{b} : {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        bottom: 'bottom',
        data: ['20-29岁','30-39岁','40-49岁','50-59岁','60-69岁']
    },
    series : [
        {
            // name: '访问来源',
            type: 'pie',
            radius : '50%',
            data:[
                {value:335, name:'20-29岁'},
                {value:310, name:'30-39岁'},
                {value:234, name:'40-49岁'},
                {value:135, name:'50-59岁'},
                {value:1548, name:'60-69岁'}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
myChart7.setOption(option7);